package service;

public class SendMailSvcProxy implements service.SendMailSvc {
  private String _endpoint = null;
  private service.SendMailSvc sendMailSvc = null;
  
  public SendMailSvcProxy() {
    _initSendMailSvcProxy();
  }
  
  public SendMailSvcProxy(String endpoint) {
    _endpoint = endpoint;
    _initSendMailSvcProxy();
  }
  
  private void _initSendMailSvcProxy() {
    try {
      sendMailSvc = (new service.SendMailSvcServiceLocator()).getSendMailSvc();
      if (sendMailSvc != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)sendMailSvc)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)sendMailSvc)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (sendMailSvc != null)
      ((javax.xml.rpc.Stub)sendMailSvc)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public service.SendMailSvc getSendMailSvc() {
    if (sendMailSvc == null)
      _initSendMailSvcProxy();
    return sendMailSvc;
  }
  
  public java.lang.String sendemail() throws java.rmi.RemoteException{
    if (sendMailSvc == null)
      _initSendMailSvcProxy();
    return sendMailSvc.sendemail();
  }
  
  
}